@(ads: List[Advertisement], cat: Category)

@import helper._


@main("Ads") {

	@if(cat.hasParent()){
		<h5><a style="color: #333;" href='/advertisement/list/@cat.getParent().getId()'>@cat.getParent().getName()</a> -> @cat.getName() (@ads.size())</h5>
	}else{
		<h5>@cat.getName() (@ads.size())</h5>
	}
	<hr />
	<fieldset>
	@for(ad <- ads){	
		<div class="column" style="width:350px; margin:0 auto; padding: 7px; ;">
			<h5>@ad.getName() - @ad.getUser().getEmail()</h5>
			<div  style="height:254px; vertical-align:middle;">
				<a href='/advertisement/info/@ad.getId()'>
					<img class="img-responsive" src="@routes.Assets.at("images/advertisement/")@ad.getPhoto()"/>
				</a>
			</div>
				
			<hr />
			<p>Price: @ad.getPrice() HUF </p><br />
			<p>Description: <a href='/advertisement/info/@ad.getId()'>Details-></a></p>
			<!--<a href="javascript:history.go(-1)"><-back</a>-->
		</div>
	}
	</fieldset>

}